package com.foldingleaf.bank.service.impl;

import java.util.List;

import com.foldingleaf.withdraw.domain.UserBankCard;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foldingleaf.bank.mapper.UserBankCardMapper;

import com.foldingleaf.bank.service.IUserBankCardService;

/**
 * 用户银行卡绑定Service业务层处理
 * 
 * @author ajian
 * @date 2022-06-22
 */
@Service
public class UserBankCardServiceImpl implements IUserBankCardService 
{
    @Autowired
    private UserBankCardMapper userBankCardMapper;

    /**
     * 查询用户银行卡绑定
     * 
     * @param cardId 用户银行卡绑定主键
     * @return 用户银行卡绑定
     */
    @Override
    public UserBankCard selectUserBankCardByCardId(Long cardId)
    {
        return userBankCardMapper.selectUserBankCardByCardId(cardId);
    }

    /**
     * 查询用户银行卡绑定列表
     * 
     * @param userBankCard 用户银行卡绑定
     * @return 用户银行卡绑定
     */
    @Override
    public List<UserBankCard> selectUserBankCardList(UserBankCard userBankCard)
    {
        return userBankCardMapper.selectUserBankCardList(userBankCard);
    }

    /**
     * 新增用户银行卡绑定
     * 
     * @param userBankCard 用户银行卡绑定
     * @return 结果
     */
    @Override
    public int insertUserBankCard(UserBankCard userBankCard)
    {
        return userBankCardMapper.insertUserBankCard(userBankCard);
    }

    /**
     * 修改用户银行卡绑定
     * 
     * @param userBankCard 用户银行卡绑定
     * @return 结果
     */
    @Override
    public int updateUserBankCard(UserBankCard userBankCard)
    {
        return userBankCardMapper.updateUserBankCard(userBankCard);
    }

    /**
     * 批量删除用户银行卡绑定
     * 
     * @param cardIds 需要删除的用户银行卡绑定主键
     * @return 结果
     */
    @Override
    public int deleteUserBankCardByCardIds(Long[] cardIds)
    {
        return userBankCardMapper.deleteUserBankCardByCardIds(cardIds);
    }

    /**
     * 删除用户银行卡绑定信息
     * 
     * @param cardId 用户银行卡绑定主键
     * @return 结果
     */
    @Override
    public int deleteUserBankCardByCardId(Long cardId)
    {
        return userBankCardMapper.deleteUserBankCardByCardId(cardId);
    }
}
